package com.lemon.cloud.minio.util;

import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import lombok.experimental.UtilityClass;

@UtilityClass
public class FileUtils {

    public String getFileExtName(String original){
        return FileUtil.extName(original);
    }


    public String generateFileName(String original){
        String suffix = getFileExtName(original);

        return IdUtil.simpleUUID() + StrUtil.DOT + suffix;
    }
}
